﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AdaptiveAgents.Running_Tools.Agent_Lists
{   
    /// <summary>
    /// This class contains list of agents type.
    /// </summary>
    public abstract class AgentsTypeList
    {
        /// <summary>
        /// AgentsTypeList of agents type.
        /// </summary>
        protected List<string> _AgantsList;
        /// <summary>
        /// Size of the list.
        /// </summary>
        protected int _Size;
        /// <summary>
        /// The type of the list.
        /// </summary>
        protected string _Type;

        /// <summary>
        /// Default Ctor
        /// </summary>
        public AgentsTypeList() { _AgantsList = new List<string>(); }


        /// <summary>
        /// Ctor of "AgentList" Class.
        /// </summary>
        /// <param name="list">AgentsTypeList of agents type</param>
        /// <param name="size">Size of the list</param>
        /// <param name="type">Type fo the list</param>
        public AgentsTypeList(List<string> list, int size, string type)
        {
            _AgantsList = list;
            _Size = size;
            _Type = type;
        }


        /// <summary>
        /// Ctor of "AgentList" Class.
        /// </summary>
        /// <param name="type">Type of the list</param>
        /// <param name="size">Size of the list</param>
        public AgentsTypeList(string type, int size)
        {
            _AgantsList = new List<string>();
            _Type = type;
            _Size = size;
        }        


        /// <summary>
        /// Setter and Getter to the agents list
        /// </summary>
        public List<string> AgentList
        {
            get { return _AgantsList; }
            set { _AgantsList = value; }
        }


        /// <summary>
        /// Setter and Getter to the agents list size
        /// </summary>
        public int Size
        {
            get { return _Size; }
            set { _Size = value; }
        }


        /// <summary>
        /// Setter and Getter to the agents list type
        /// </summary>
        public string Type
        {
            get { return _Type; }
            set { _Type = value; }
        }


        /// <summary>
        /// This function change specific agent type
        /// </summary>
        /// <param name="type">Type of agent</param>
        /// <param name="number">The specific number</param>
        public void ChangeAgentType(string type, int index)
        {
            _AgantsList[index] = type;
        }


        /// <summary>
        /// This abstract function create the agents list.
        /// </summary>
        public abstract void CreateList();
    }
}
